package com.cy.jt.jt;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

@SpringBootApplication
public class SpringSecurityApplication {
    public static void main(String[] args) {
        SpringApplication.run(SpringSecurityApplication.class, args);
        encodePwd();
    }
    static void encodePwd() {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        String password = "123456";//明文
        //将密码明文进行加密
        String newPwd = encoder.encode(password);//60位长度
        System.out.println(newPwd);//$2a$10$fahHJIe3SJm3KcyiPPQ2d.a2qR029gB3qKHrKanQ87u.KbtZ6Phr.
    }
}
